From 4d423f9a656ad65e814f15b7a3015492ddb3f1be Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 10 Oct 2005 11:37:10 +0100 Subject: [PATCH] No need to gate xenstored reading requests from a connection on whether there are pending replies/watches. Signed-off-by: Keir Fraser --- tools/xenstore/xenstored_core.c | 3 +-- tools/xenstore/xenstored_domain.c | 3 +-- tools/xenstore/xenstored_transaction.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 4c998bea70..50bdee9a66 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -324,8 +324,7 @@ static int initialize_set(fd_set *inset, fd_set *outset, int sock, int ro_sock) list_for_each_entry(i, &connections, list) { if (i->domain) continue; - if (list_empty(&i->out_list)) - FD_SET(i->fd, inset); + FD_SET(i->fd, inset); if (!list_empty(&i->out_list)) FD_SET(i->fd, outset); if (i->fd > max) diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c index 15c98bfb49..e35990b12d 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -276,8 +276,7 @@ void handle_event(void) bool domain_can_read(struct connection *conn) { - return (list_empty(&conn->out_list) && - buffer_has_input(conn->domain->input)); + return buffer_has_input(conn->domain->input); } bool domain_can_write(struct connection *conn) diff --git a/tools/xenstore/xenstored_transaction.c b/tools/xenstore/xenstored_transaction.c index c0b4f3206e..640d10540f 100644 --- a/tools/xenstore/xenstored_transaction.c +++ b/tools/xenstore/xenstored_transaction.c @@ -154,9 +154,9 @@ void do_transaction_end(struct connection *conn, const char *arg) return; } - /* Set to NULL so fire_watches sends events, tdb_context works. */ trans = conn->transaction; conn->transaction = NULL; + /* Attach transaction to arg for auto-cleanup */ talloc_steal(arg, trans); -- 2.30.2